<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/public/head.jspf" %>
    <c:set value="${pageContext.request.contextPath }" var="booking" />
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" >
$(function(){
	//注册button的事件
	$("#submit").click(function(){
			alert(2);
			//调用submit方法提交数据
			$("#ff").form('submit', {
				url: 'product_save.action',
				success: function(){
					//如果成功了，关闭当前窗口
					parent.$("#win").window("close");
					parent.$("iframe[title='商品管理']").get(0).contentWindow.$("#dg").datagrid("reload");
				}
			});
		
	});
	
	//注册button的事件
	$("#reset").click(function(){
		//重置当前表单数据
		$("#ff").form("reset");
	});
});
</script>
</head>
<body>
<form id="ff" method="post">   
	<div align="center" style="margin-right: 250px">
     <table cellpadding="2">  
                    <tr>  
                        <td>商家名称:</td>  
                        <td><input class="easyui-validatebox textbox" data-options="required:true,validType:'length[3,10]',novalidate:true"></td>  
                     </tr>  
                    <tr>  
                      <td>上传图片:</td>  
                        <td> <input type="file" name="fileImage.upload" /></td>  
                    </tr> 
                    <tr>
                    	 <td>备注:</td>  
                        <td><input class="easyui-validatebox textbox" data-options="required:true,novalidate:true"></td>  
                    </tr> 
  		
                </table>  
                </div>
                <div align="center">
                 <a id="submit" href="#" class="easyui-linkbutton">添 加</a> 
					<a id="reset" href="#" class="easyui-linkbutton">重 置</a>
				</div>
</form>  

</body>
</html>